﻿<div class="easyui-panel" data-options="fit:true">
    <table id="dg"></table>
</div>

<script>
    $(function () {
        $('#dg').datagrid({
            title: '个人台账',
            nowrap: false,
            striped: true,
            collapsible: true,
            idField: "id",
            data: [
                {
                    id: 1, deptName: "单位1", userName: "人员1", management: "级别1",
                    laborcount: 10, joinLaborcount: 11, laborDiffs: 3, laborFlag: "是",
                    studycount: 5, joinStudycount: 7, studyDiffs: 2, studyFlag: "否",
                    by11: 1, by22: 2, by33: 3, by44: "是",
                    by111: 11, by222: 22, by333: 33, by444: "是"
                },
                {
                    id: 2, deptName: "单位2", userName: "人员2", management: "级别2",
                    laborcount: 10, joinLaborcount: 11, laborDiffs: 3, laborFlag: "是",
                    studycount: 5, joinStudycount: 7, studyDiffs: 2, studyFlag: "否",
                    by11: 1, by22: 2, by33: 3, by44: "是",
                    by111: 11, by222: 22, by333: 33, by444: "是"
                },
                {
                    id: 3, deptName: "单位3", userName: "人员3", management: "级别3",
                    laborcount: 10, joinLaborcount: 11, laborDiffs: 3, laborFlag: "是",
                    studycount: 5, joinStudycount: 7, studyDiffs: 2, studyFlag: "否",
                    by11: 1, by22: 2, by33: 3, by44: "是",
                    by111: 11, by222: 22, by333: 33, by444: "是"
                },
                {
                    id: 4, deptName: "单位4", userName: "人员4", management: "级别4",
                    laborcount: 10, joinLaborcount: 11, laborDiffs: 3, laborFlag: "是",
                    studycount: 5, joinStudycount: 7, studyDiffs: 2, studyFlag: "否",
                    by11: 1, by22: 2, by33: 3, by44: "是",
                    by111: 11, by222: 22, by333: 33, by444: "是"
                },
            ],
            remoteSort: false,
            frozenColumns: [
                [
                    { field: 'deptName', title: '单位名称', width: 100, align: 'center' },
                    { field: 'userName', title: '姓名', width: 100, align: 'center' },
                    { field: 'management', title: '监管等级', width: 100, align: 'center', sortable: true }
                ]
            ],
            columns:
            [
                [
                    { title: '社区服务', colspan: 4 },
                    { title: '教育学习', colspan: 4 },
                    { title: '电话汇报', colspan: 8 }
                ],
                [
                    { field: 'laborcount', title: '总场次', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'joinLaborcount', title: '报道次数', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'laborDiffs', title: '总时长', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'laborFlag', title: '是否达标', width: 100, align: 'center', sortable: true, rowspan: 2 },

                    { field: 'studycount', title: '总场次', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'joinStudycount', title: '报道次数', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'studyDiffs', title: '总时长', width: 100, align: 'center', sortable: true, rowspan: 2 },
                    { field: 'studyFlag', title: '是否达标', width: 100, align: 'center', sortable: true, rowspan: 2 },

                    { title: '本月', width: 100, align: 'center', sortable: true, colspan: 4 },
                    { title: '第一周', width: 100, align: 'center', sortable: true },
                    { title: '第二周', width: 100, align: 'center', sortable: true },
                    { title: '第三周', width: 100, align: 'center', sortable: true },
                    { title: '第四周', width: 100, align: 'center', sortable: true }
                ],
                [
                    { field: 'by11', title: '总<br />次<br />数', width: 100, align: 'center', sortable: true },
                    { field: 'by22', title: '待<br />监<br />听', width: 100, align: 'center', sortable: true },
                    { field: 'by33', title: '异<br />常<br />电<br />话', width: 100, align: 'center', sortable: true },
                    { field: 'by44', title: '是<br />否<br />达<br />标', width: 100, align: 'center', sortable: true },

                    { field: 'by111', title: '1-7日', width: 100, align: 'center', sortable: true },
                    { field: 'by222', title: '8-14日', width: 100, align: 'center', sortable: true },
                    { field: 'by333', title: '15-21日', width: 100, align: 'center', sortable: true },
                    { field: 'by444', title: '22日后', width: 100, align: 'center', sortable: true }
                ]
            ]
        });
    });
</script>